import React, { useEffect, useState } from 'react'

export default function useTimerHookCom() {
  let date=new Date()
  let [time,setTime]=useState(date.getFullyear())
  useEffect(()=>{
    // console.log(time);
    setInterval(()=>{
      setTime(date.getFullYear())
    },1000)
  })
  return time
}
